<template>
  <div>
    <KunkkaTreeTransfer :fromData="fromData" @getTtData="getTtData" />
    <div class="markdown-body">
      <readme />
    </div>
  </div>
</template>

<script>
import Readme from './readme.md';
export default {
  components: { Readme },
  data() {
    return {
      fromData: [{
        id: "1",
        pid: 0,
        label: "一级 1",
        children: [{
            id: "1-1",
            pid: "1",
            label: "二级 1-1",
            disabled: true,
            children: []
          },
          {
            id: "1-2",
            pid: "1",
            label: "二级 1-2",
            children: [{
                id: "1-2-1",
                pid: "1-2",
                children: [],
                label: "二级 1-2-1"
              },
              {
                id: "1-2-2",
                pid: "1-2",
                children: [],
                label: "二级 1-2-2"
              }
            ]
          }
        ]
      }]
    };
  },
  methods: {
    getTtData(needData, fromData, toData, obj) {
      // 根据needParam组成的数组、左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
      console.log(needData, fromData, toData, obj)
    }
  }
};
</script>

<style></style>
